package com.nervenets.web.hibernate.dao;

import com.nervenets.web.hibernate.domain.Building;
import com.nervenets.web.hibernate.domain.Manager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface BuildingDao extends JpaRepository<Building, Long>, JpaSpecificationExecutor<Building> {
    Building findTop1ByManager(Manager manager);
}
